import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'detail',
  template: `
              <a class="edit" (click)="editContact()">编辑</a>
              <change-log [contact]="detail"></change-log>
            `
})

export class DetailComponent implements OnInit {
  detail: any = {};
  tel = 15600000000;
  editContact() {
    this.tel++;
    this.detail = {
      name: '小甜甜',
      tel: this.tel
    };
  }
  ngOnInit(): void {
    // throw new Error('Method not implemented.');
  }
}
